﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
///TermUtils 的摘要说明
/// </summary>
public class TermUtils
{
	public TermUtils()
	{
       
	}
    /// <summary>
    /// 分割类似“2013上”的学年学期格式，转换成"[2013,0]"数组格式
    /// </summary>
    /// <param name="yterm"></param>
    /// <returns></returns>
    public static string[] splitYTerm(string yterm)
    {
        string[] termback = new string[2];
        termback[0] = yterm.Substring(0, 4);
        termback[1] = yterm.Substring(4, 1).Equals("上") ? "0" : "1";
        return termback;
    }
}